﻿using System;
namespace ElingOA6_Admin_DSJCJ.Model
{
    /// <summary>
    /// Leave:实体类(属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]
    public partial class Leave
    {
        public Leave()
        {
            FInsDate = DateTime.Now;
            FIsAdditonIns = "N";
        }
        #region Model
        /// <summary>
        /// 
        /// </summary>
        public decimal FLeaveID
        {
            set;
            get;
        }
        /// <summary>
        /// 公司编码
        /// </summary>
        public string FEntityNo
        {
            set;
            get;
        }
        /// <summary>
        /// 员工编号
        /// </summary>
        public string FEmplNo
        {
            set;
            get;
        }
        public string FClass
        {
            set;
            get;
        }
        /// <summary>
        /// 员工编号
        /// </summary>
        public string FEmplName
        {
            set;
            get;
        }

        public string EndXZ
        {
            get;
            set;
        }

        public string BeginXZ
        {
            get;
            set;
        }
        /// <summary>
        /// 请假外出事由编码
        /// </summary>
        public string FLeaveReasonCd
        {
            set;
            get;
        }

        public string FLeaveReasonName
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public string FDeptNo
        {
            set;
            get;
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime FBeginDate
        {
            set;
            get;
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime FEndDate
        {
            set;
            get;
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? FSignOutDate
        {
            set;
            get;
        }
        /// <summary>
        /// 员工编号
        /// </summary>
        public string FSignOutEmpNo
        {
            set;
            get;
        }
        /// <summary>
        /// 
        /// </summary>
        public string FSignOutIP
        {
            set;
            get;
        }
        /// <summary>
        /// 
        /// </summary>
        public string FReason
        {
            set;
            get;
        }
        /// <summary>
        /// 员工编号
        /// </summary>
        public string FInsEmpNo
        {
            set;
            get;
        }

        /// <summary>
        /// 员工编号
        /// </summary>
        public string FInsEmpName
        {
            set;
            get;
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime FInsDate
        {
            set;
            get;
        }
        /// <summary>
        /// 
        /// </summary>
        public string FInsIP
        {
            set;
            get;
        }
        /// <summary>
        /// 员工编号
        /// </summary>
        public string FUpdEmpNo
        {
            set;
            get;
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? FUpdDate
        {
            set;
            get;
        }
        /// <summary>
        /// 
        /// </summary>
        public string FUpdIP
        {
            set;
            get;
        }

        /// <summary>
        /// 显示的开始时间和结束时间
        /// </summary>
        public string ShowDate
        {
            //get {

            //    if (FSignOutDate == null)
            //    {
            //        return FBeginDate.ToString("yyyy-MM-dd HH:mm") + "至" + FEndDate.ToString("yyyy-MM-dd HH:mm");
            //    }
            //    else
            //    {
            //        return FBeginDate.ToString("yyyy-MM-dd HH:mm") + "至" +  DateTime.Parse(FSignOutDate.ToString()).ToString("yyyy-MM-dd HH:mm");
            //    }
            //}
            get
            {

                if (FSignOutDate == null)
                {
                    return FBeginDate.ToString("yyyy-MM-dd HH:mm");
                }
                else
                {
                    return FBeginDate.ToString("yyyy-MM-dd HH:mm") ;
                }
            }
        }

        /// <summary>
        /// 显示用更新时间
        /// </summary>
        public string FUpdDateStr
        {
            get
            {
                if (FUpdDate != null)
                {
                    return DateTime.Parse(FUpdDate.ToString()).ToString("yyyy-MM-dd");
                }
                else
                {
                    return DateTime.Parse(FInsDate.ToString()).ToString("yyyy-MM-dd");
                }

            }
        }

        public string FIsSignOut
        {
            get;
            set;
        }
        /// <summary>
        /// 是否补录
        /// </summary>
        public string FIsAdditonIns
        {
            set;
            get;
        }
        /// <summary>
        /// 审核人员
        /// </summary>
        public string FAuditEmplNo
        {
            set;
            get;
        }
        /// <summary>
        /// 审核时间
        /// </summary>
        public DateTime? FAuditDate
        {
            set;
            get;
        }
        /// <summary>
        /// 审核IP
        /// </summary>
        public string FAuditIP
        {
            set;
            get;
        }
        /// <summary>
        /// 审核情况
        /// </summary>
        public string FAuditNote
        {
            set;
            get;
        }
        /// <summary>
        /// 审核情况文字显示
        /// </summary>
        public string strFAuditNote
        {
            get
            {
                if (FAuditNote == null || FAuditNote=="")
                {
                    return "未审核";
                }
                else
                {
                    return FAuditNote == "Y" ? "通过" : "未通过";
                }
            }
        }
        #endregion Model

    }
}

